//
//  UIAlertController+Helper.h
//  SheMeasured
//
//  Created by ddkj on 2019/5/14.
//  Copyright © 2019 xmddkj. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN


@interface UIAlertActionConfig : NSObject

@property (nonatomic,copy)   NSString *text;
@property (nonatomic,strong) UIFont *font;
@property (nonatomic,strong) UIColor *color;

@property (nonatomic,readonly) UIColor *defaultColor;
@property (nonatomic,readonly) UIFont *defaultFont;

+ (instancetype)configWithText:(NSString *)text font:(UIFont *)font color:(UIColor *)color;
+ (instancetype)configWithText:(NSString *)text color:(UIColor *)color;
+ (instancetype)configWithText:(NSString *)text;

@end





@interface NSString (UIAlertActionConfig_Ext)

- (UIAlertActionConfig *)configWithColor:(UIColor *)color;
- (UIAlertActionConfig *)configWithFont:(UIFont *)font color:(UIColor *)color;

@end





@interface UIAlertAction (CustomConfig)

@property (nonatomic,strong) UIFont *fc_tempFont;
@property (nonatomic,strong) UIFont *fc_font;
- (void)updateFont;

@property (nonatomic,strong) UIView *fc_cusView;

@end





@interface UIAlertController (Helper)

+ (instancetype)alertWithTitle:(id)title
                       message:(id)message
                 fieldSettings:(void(^)(UITextField *textField))fieldSettings
                        cancel:(id)cancel
                        others:(NSArray *)others
                        action:(void (^)(NSInteger index, NSString *title, NSString *text))action;

+ (instancetype)alertWithTitle:(id)title
                       message:(id)message
                        cancel:(id)cancel
                        others:(NSArray *)others
                        action:(void (^)(NSInteger index, NSString *title))action;

+ (instancetype)sheetWithTitle:(id)title
                       message:(id)message
                        cancel:(id)cancel
                        others:(NSArray *)others
                        action:(void (^)(NSInteger index, NSString *title))action;

+ (void)testCusAlertInVC:(UIViewController *)aVC;


@end

NS_ASSUME_NONNULL_END
